{template 'header', 'index'}
<div class="main">
  <h2 class="pubtitle"><span>会员登录</span>
    <div class="c"></div>
  </h2>
  <div class="table-form" style="border-right:1px solid #E5E5E5; width:700px;float:left;">
  <form action="?m=member&a=login" method="post" name="myform" id="myform">
    <div class="inputbox">
    <label class="t">用户名：</label>
    <input type="text" class="input" name="username" id="username" size="30" />
    </div>
    <div class="inputbox">
    <label class="t">密&nbsp;码：</label>
    <input type="password" class="input" name="password" id="password" size="30" />
    </div>
    <div class="inputbox">
    <label class="t">验证码：</label>
    <input type="text" class="input" name="captcha" id="captcha" size="10" />
    <img onclick="javascript:this.src='?m=api&a=captcha&_' + new Date().getTime()" src="?m=api&a=captcha" title="看不清楚？换一张" style="display: inline; vertical-align:middle; cursor:pointer">
    </div>
    <div class="inputbox">
    <label class="t">&nbsp;</label>
    <input type="checkbox" name="cookietime" id="cookietime" value="1" />
    <label for="cookietime">记住用户名</label>
    <label><a href="#">忘记密码？</a></label>
    </div>
    <div class="inputbox">
    <label class="t">&nbsp;</label>
    <input type="hidden" name="http_referer" value="{HTTP_REFERER}" />
    <input type="submit" class="btn2" name="dosubmit" id="dosubmit" value="登录" />
    </div>
  </form>
  </div>
  <div style="float:left;padding:10px 0 0 30px;">
    <p class="f14" style="margin-bottom:10px;">您还没有注册<br />教教家教网会员？</p>
    <input type="button" class="btn2" value="立即注册" onclick="window.location.href='?m=member&c=index&a=register'" />
  </div>
  <div class="c"></div>
</div>
{template 'footer', 'index'}
<script type="text/javascript" src="{JS_PATH}formvalidator.js?_=0514"></script> 
<script type="text/javascript">
$(function()
{
	$.formValidator.initConfig({autotip:true,formid:"myform",onerror:function(msg){}});
	$('#username').formValidator({onshow:"请输入用户名。", onfocus:"用户名应该为3-20位之间，数字字母下划线组成。"}).inputValidator({min:3,max:20,onerror:"用户名应该为3-20位之间，数字字母下划线组成。"});
	$("#password").formValidator({onshow:"密码应该为3-16位之间。",onfocus:"密码应该为3-16位之间。"}).inputValidator({min:3,max:20,onerror:"密码应该为3-16位之间"});
	$('#captcha').formValidator({onshow:'请输入验证码', onfocus:'请输入验证码', oncorrect:'验证码输入正确'}).inputValidator({min:4, max:4, onerror:'验证码输入不正确'}).ajaxValidator({
		type : 'get',
		url :'',
		data :"m=api&a=check_captcha_ajax",
		datatype : "html",
		async:'false',
		success : function(data){return data == "1" ?  true : false;},
		buttons: $("#dosubmit"),
		onerror : "验证码不正确",
		onwait : "请稍候..."
		});
});
</script>